<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:panelGroup id="panelFiltroPesquisa" layout="block"
		rendered="#{pManagedBean.isExibirCamposPesquisaPadrao}">

		<p:panel id="panel_formPesquisa" header="#{i18n.filtro}"
			toggleable="true" toggleTitle="#{i18n['toggle.title']}"
			toggleSpeed="#{i18n['toggle.speed']}"
			rendered="#{!pManagedBean.isExibirFormEdicao}">

			<h:panelGroup layout="block" styleClass="col-md-6">
				<ui:insert name="camposFormularioPesquisa" />

				<p:defaultCommand target="btnPesquisar" />

				<p:commandButton title="#{i18n['tooltip.btnPesquisar']}"
					style="margin-right:8px;" id="btnPesquisar"
					actionListener="#{pManagedBean.doPesquisar}"
					value="#{i18n.btnPesquisar}"
					update="panelListagem,exportador,panelExportador#{pManagedBean.updateExtraBtnPesquisar}">
				</p:commandButton>

				<p:commandButton id="btnNovo" title="#{i18n['tooltip.btnNovo']}"
					style="margin-right:8px;" action="#{pManagedBean.showNovo}"
					value="#{i18n.btnNovo}" ajax="false"
					rendered="#{pIsExibirBtnNovo and pManagedBean.btnNovoIfGranted}"
					disabled="#{pManagedBean.btnNovoDisabled}" />

				<ui:insert name="demaisBotoesFormularioPesquisa" />
			</h:panelGroup>

			<h:panelGroup layout="block" styleClass="col-md-6">
				<ui:insert name="demaisCamposFormularioPesquisa" />
			</h:panelGroup>
			
			<div class="clear"/>
		</p:panel>
		<ui:insert name="panelDepoisFiltroPesquisa" />
	</h:panelGroup>
</ui:composition>

</html>